/**
 * 
 */
package cn.dgfy.MyBatisStudy.bean;

/**
 * @author Tearfalls
 *
 */
public class Student {
	private Integer id = 0;
	private String username = "";
	private String password = "";
	private String realName = "";
	
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		if (id == null) {
			this.id = 0;
		} else {
			this.id = id;
		}
	}
	
	public String getUsername() {
		return username;
	}
	
	public void setUsername(String username) {
		if (username == null) {
			this.username = "";
		} else {
			this.username = username;
		}
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		if (password == null) {
			this.password = "";
		} else {
			this.password = password;
		}
	}
	
	public String getRealName() {
		return realName;
	}
	
	public void setRealName(String realName) {
		if (realName == null) {
			this.realName = "";
		} else {
			this.realName = realName;
		}
	}
	
	/**
	 * 无参构造方法
	 */
	public Student() {
		super();
	}
	
	/**
	 * 全参数构造方法
	 * 
	 * @param id
	 *            学生的id
	 * @param username
	 *            学生的用户名
	 * @param password
	 *            学生的密码
	 * @param realName
	 *            学生的真实姓名
	 */
	public Student(Integer id, String username, String password, String realName) {
		super();
		this.setId(id);
		this.setUsername(username);
		this.setPassword(password);
		this.setRealName(realName);
	}
	
	@Override
	public String toString() {
		return "Student [ id = " + id + ", username = " + username + ", password = " + password + ", realName = " + realName + " ]";
	}
}
